package com.xyy.saas.payment.cores.enums;

/**
 * @Author: wuqiongda
 * @Date: 2020/3/25 11:34
 */
public enum  AccountChannelEnum {

    /**
     * 操作账户渠道，目前只有一种
     */
    AGGREGATE("aggregate");

    private String channel;

    AccountChannelEnum(String channel){
        this.channel = channel;
    }

    public String getChannel() {
        return channel;
    }

    public static boolean contains(String code) {
        if (code == null || code.trim().length() == 0) {
            return false;
        }
        for (AccountChannelEnum channelEnum : AccountChannelEnum.values()) {
            if (channelEnum.channel.equals(code.trim())) {
                return true;
            }
        }
        return false;
    }
}
